<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		window.onload=function (argument) {

			var ipt =document.getElementById('ipt');
			ipt.removeAttribute("disabled");
			var btn =document.getElementById('btn');
			var a=true;
			btn.onclick=function(){
				if(a){
					a=!a
					console.log('a');
				}else{
					a=!a
					console.log('b');
				}
				console.log(a);
			}
		}
	</script>
</head>
<body>
	<input type="text" disabled id="ipt">
	<p>打开控制台 我想实现点击 改变a的值</p>
	<button id="btn">点击切换</button>
</body>
</html>